package com.PengGoBook.main.utils;

import android.app.Activity;
import android.content.Intent;
import com.PengGoBook.main.R;
import org.apache.http.message.BasicNameValuePair;

/**
 * Created with IntelliJ IDEA.
 * User: S7
 * Date: 13-5-29
 * Time: 上午10:01
 * To change this template use File | Settings | File Templates.
 */
public class IntentUtil {
    public static void start_activity(Activity activity,Class<?> cls,BasicNameValuePair...name)
    {
        Intent intent=new Intent();
        intent.setClass(activity,cls);
        for(int i=0;i<name.length;i++)
        {
            intent.putExtra(name[i].getName(), name[i].getValue());
        }
        activity.startActivity(intent);
        activity.overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
    }
}